<?php
/**
 * Created by PhpStorm.
 * Author: Shadow
 * Date: 2022/7/18
 * Time: 8:52 上午
 * description: shop.php
 * 电商后台的路由信息
 */


use think\facade\Route;


// 展示视图方法一 利用回调函数
Route::get('login',function (){
    \think\facade\View::config(['layout_on' => false]);
   return \think\facade\View::fetch('login');
});

Route::post('doLogin',"Manager/doLogin");

// 展示视图方法二 通过控制方法进行展示
//Route::get('login','login/login');


//在某个路由中使用中间价
Route::get('goodsList','goods/list')->middleware(\app\shop\middleware\Check::class);

Route::post('batchDel','goods/batchDel');

Route::get('goodsAdd','goods/add');//展示添加页面

//实现商品添加
Route::post('goodsSave','goods/goodsSave');

// 实现商品的单条数据删除
Route::get('delete/:id','goods/delete');

// 实现商品的修改
Route::get('edit/:id','goods/edit');
Route::post('update','goods/update');

// 状态的修改
Route::post('updateStatus','goods/updateStatus');

// wangEditro文件上传的接口
Route::post('uploadImage','goods/uploadImage');

// 公共函数
Route::get('common','goods/common');

Route::get('getChildCategory','goods/getChildCategory');
